package com.nantian.entity;

import org.springframework.data.annotation.Id;


import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;


import java.io.Serializable;
import java.util.Date;

@Document(indexName = "test999",type = "user")
@org.springframework.data.mongodb.core.mapping.Document(collection = "user")
public class User implements Serializable {

    @Id
    @Field(store = true,type = FieldType.Auto)
    private Long uid;

    @Field(store = true,type = FieldType.Auto)
    private String name;

    @Field(store = true,type = FieldType.Auto)
    private String address;

    @Field(store = true,type = FieldType.Auto)
    private Date intodate;

    public User(Long uid, String name, String address, Date intodate) {
        this.uid = uid;
        this.name = name;
        this.address = address;
        this.intodate = intodate;
    }

    public Date getIntodate(Date date) {

        return intodate;
    }

    public void setIntodate(Date intodate) {
        this.intodate = intodate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "User{" +
                "uid=" + uid +
                ", name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", intodate=" + intodate +
                '}';
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public User(Long uid, String name, String address) {

        this.uid = uid;
        this.name = name;
        this.address = address;
    }



    public User() {

    }
}
